import { http ,ForMoHe } from "./tools"

module.exports = {
  
    /**
   * 登录
   */
  userLogin(data = {}) {
    const data1 = Object.assign({
      url: "/login/userLogin"
    }, {
      data,
      contentType: true
    })
    return http(data1, "apiForMoHe")
  },
  /**
   * 城镇
   */
  cityList(data = {}) {
    const data1 = Object.assign({
      url: "/generalBusiness/generalQueryByTableName"
    }, {
      data,
      contentType:true,
      method: 'post'
    })
    return ForMoHe(data1)
  },
 /**
   * 社区
   */
  village(data = {}) {
    const data1 = Object.assign({
      url: "/generalBusiness/generalQueryByTableName"
    }, {
      data,
      contentType:true,
      method: 'post'
    })
    return ForMoHe(data1)
  },
  /**
   * 获取大屏 时政要闻 工作动态轮播图
   */
  workDynamicBannerList(data = {}) {
    const data1 = Object.assign({
      url: "/news/getWorkDynamicBannerList"
    }, {
      data,
      method: 'GET'
    })
    return http(data1)
  }, 
  
  /**
  * 获取大屏 视频类 根据分类获取列表
  */
  videoByCategory(data = {}) {
    const data1 = Object.assign({
      url: "/videos/getVideosByCategory"
    }, {
      data,
      method: 'GET'
    })
    return http(data1)
  },

  /**
   * 手机号注册
   */
  registerMember(data = {}) {
    const data1 = Object.assign({
      url: "/api/wx/memberInfoApi/registerMember"
    }, {
      data
    })
    return http(data1)
  },

  /**
   * 获取手机验证码
   */
  createRegisterVarCode(data = {}) {
    const data1 = Object.assign({
      url: "/api/wx/shortMsgApi/createRegisterVarCode"
    }, {
      data
    })
    return http(data1)
  },

  /**
   * 获取电子的围栏
   */
  findNearbyFence(data = {}) {
    const data1 = Object.assign({
      url: "/api/wx/LockDeviceApi/findNearbyFence"
    }, {
      data
    })
    return http(data1)
  },

  /**
   * 获取附近的车锁
   */
  findNearbyLock(data = {}) {
    const data1 = Object.assign({
      url: "/api/wx/LockDeviceApi/findNearbyLock"
    }, {
      data
    })
    return http(data1)
  },

  /**
   * 获取附近的站点
   */
  allParkPoint(data = {}) {
    const data1 = Object.assign({
      url: "/api/wx/LockDeviceApi/getAllParkPoint"
    }, {
      data
    })
    return http(data1)
  },

  /**
   * 检查用户权限和运营商配置
   */
  checkUser(data = {}) {
    const data1 = Object.assign({
      url: "/api/wx/memberInfoApi/checkUserAndDistributor"
    }, {
      data
    })
    return http(data1)
  },

  /**
   * 查询未支付的订单
   */
  checkUnpaid(data = {}) {
    const data1 = Object.assign({
      url: "/api/wx/memberInfoApi/checkIsHasUnpaidOrder"
    }, {
      data
    })
    return http(data1)
  },

  /**
   * 查询订单详情
   */
  memberRidingOrder(data = {}) {
    const data1 = Object.assign({
      url: "/api/wx/memberInfoApi/checkMemberRidingOrder"
    }, {
      data
    })
    return http(data1)
  },

  /**
   * 查询订单列表
   */
  tripByMemberId(data = {}) {
    const data1 = Object.assign({
      url: "/api/wx/tripApi/findTripByMemberId"
    }, {
      data
    })
    return http(data1)
  },

  /**
   * 获取id
   */
  checkTrip(data = {}) {
    const data1 = Object.assign({
      url: "/api/wx/memberInfoApi/checkTrip"
    }, {
      data
    })
    return http(data1)
  },

  /**
   * 获取已缴纳会员运营商押金信息
   */
  depositList(data = {}) {
    const data1 = Object.assign({
      url: "/api/wx/memberInfoApi/getMemberDeposit"
    }, {
      data
    })
    return http(data1)
  },

  /**
   * 退押金申请
   */
  withdrawal(data = {}) {
    const data1 = Object.assign({
      url: "/api/wx/WithdrawalApi/createWithdrawal"
    }, {
      data
    })
    return http(data1)
  },

  /**
   * 取消退押金申请
   */
  returnDeposit(data = {}) {
    const data1 = Object.assign({
      url: "/api/wx/PayApi/returnDeposit"
    }, {
      data
    })
    return http(data1)
  },

  /**
   * 获取会员消费记录
   */
  rechargeRecord(data = {}) {
    const data1 = Object.assign({
      url: "/api/wx/memberInfoApi/getRechargeRecord"
    }, {
      data
    })
    return http(data1)
  },

  /**
   * 查询优惠券
   */
  couponPlan(data = {}) {
    const data1 = Object.assign({
      url: "/api/wx/coupon/getCouponPlan"
    }, {
      data
    })
    return http(data1)
  },

  /**
   * 领取优惠券
   */
  receiveCoupon(data = {}) {
    const data1 = Object.assign({
      url: "/api/wx/coupon/scanCoupon"
    }, {
      data
    })
    return http(data1)
  },

  /**
   * 不可用优惠券
   */
  couponListNotAvailable(data = {}) {
    const data1 = Object.assign({
      url: "/api/wx/coupon/getCouponListNotAvailable"
    }, {
      data
    })
    return http(data1)
  },

  /**
   * 可用优惠券
   */
  couponListAvailable(data = {}) {
    const data1 = Object.assign({
      url: "/api/wx/coupon/getCouponListAvailable"
    }, {
      data
    })
    return http(data1)
  },

  /**
   * 根据锁编号查询运营商计费规则
   */
  settingByQrNumber(data = {}) {
    const data1 = Object.assign({
      url: "/api/wx/LockDeviceApi/getSettingByQrNumber"
    }, {
      data
    })
    return http(data1)
  },

  /**
   * 根据锁编号查询锁信息
   */
  lockDeviceByBicycleNum(data = {}) {
    const data1 = Object.assign({
      url: "/api/wx/LockDeviceApi/getLockDeviceByBicycleNum"
    }, {
      data
    })
    return http(data1)
  },

  /**
   * 支付押金
   */
  rechargeDeposit(data = {}) {
    const data1 = Object.assign({
      url: "/api/wx/PayApi/rechargeDeposit"
    }, {
      data
    })
    return http(data1)
  },

  /**
   * 蓝牙开锁创建行程
   */
  createTrip(data = {}) {
    const data1 = Object.assign({
      url: "/api/wx/tripApi/createTrip"
    }, {
      data
    })
    return http(data1)
  },

  /**
   * 还车前条件判断
   */
  checkMemberIsPtInPoly(data = {}) {
    const data1 = Object.assign({
      url: "/api/wx/tripApi/checkMemberIsPtInPoly"
    }, {
      data
    })
    return http(data1)
  },

  /**
   * 网络开锁创建行程
   */
  scanUnlockTo2g(data = {}) {
    const data1 = Object.assign({
      url: "/api/wx/tripApi/scanUnlockTo2g"
    }, {
      data
    })
    return http(data1)
  },

  /**
   * 蓝牙结束行程
   */
  endJourney(data = {}) {
    const data1 = Object.assign({
      url: "/api/wx/tripApi/endJourney"
    }, {
      data
    })
    return http(data1)
  },

  /**
   * 蓝牙关锁上报
   */
  closeLockReport(data = {}) {
    const data1 = Object.assign({
      url: "/api/wx/tripApi/closeLockReport"
    }, {
      data
    })
    return http(data1)
  },

  /**
   * 网络结束行程
   */
  endJourneyTo2G(data = {}) {
    const data1 = Object.assign({
      url: "/api/wx/tripApi/endJourneyTo2G"
    }, {
      data
    })
    return http(data1)
  },

  /**
   * 新增网络关锁接口
   */
  scanCloseTo2g(data = {}) {
    const data1 = Object.assign({
      url: "/api/wx/tripApi/scanCloseTo2g"
    }, {
      data
    })
    return http(data1)
  },

  /**
   * 行程结算
   */
  settleTrip(data = {}) {
    const data1 = Object.assign({
      url: "/api/wx/tripApi/settleTrip"
    }, {
      data
    })
    return http(data1)
  },

  /**
   * 获取骑行状态
   */
  ridingTrip(data = {}) {
    const data1 = Object.assign({
      url: "/api/wx/tripApi/findRidingTripByMemberId"
    }, {
      data
    })
    return http(data1)
  },

  /**
   * 车辆报修
   */
  createRepair(data = {}) {
    const data1 = Object.assign({
      url: "/api/wx/repairApi/createRepair"
    }, {
      data
    })
    return http(data1)
  },

  /**
   * 可购买的骑行卡套餐
   */
  needByCoupon(data = {}) {
    const data1 = Object.assign({
      url: "/api/wx/couponCard/getNeedByCoupon"
    }, {
      data
    })
    return http(data1)
  },

  /**
   * 购买骑行卡套餐
   */
  buyCoupon(data = {}) {
    const data1 = Object.assign({
      url: "/api/wx/couponCard/buyCoupon"
    }, {
      data
    })
    return http(data1)
  },

  /**
   * 查询可用骑行卡套餐
   */
  memberCoupon(data = {}) {
    const data1 = Object.assign({
      url: "/api/wx/couponCard/getMemberCoupon"
    }, {
      data
    })
    return http(data1)
  },

  /**
   * 获取客服电话
   */
  servicePhone(data = {}) {
    const data1 = Object.assign({
      url: "/api/wx/commonApi/customer/service"
    }, {
      data
    })
    return http(data1)
  },

  /**
   * 运维网络开锁
   */
  lowerHireCommond(data = {}) {
    const data1 = Object.assign({
      url: "/api/wx/LockDeviceApi/lowerHireCommond"
    }, {
      data
    })
    return http(data1)
  },

  /**
   * 运维蓝牙开锁记录
   */
  unlockForMaintain(data = {}) {
    const data1 = Object.assign({
      url: "/api/wx/tripApi/scanUnlockForMaintain"
    }, {
      data
    })
    return http(data1)
  },

  /**
   * 运维网络升级
   */
  lowerUpdateCommand(data = {}) {
    const data1 = Object.assign({
      url: "/api/wx/LockDeviceApi/lowerUpdateCommand"
    }, {
      data
    })
    return http(data1)
  },

  /**
   * 骑行安全须知
   */
  tripNotice(data = {}) {
    const data1 = Object.assign({
      url: "/api/wx/commonApi/getTripNotice"
    }, {
      data
    })
    return http(data1)
  },

  /**
   * 联系我们
   */
  contact(data = {}) {
    const data1 = Object.assign({
      url: "/api/wx/commonApi/contact/us"
    }, {
      data
    })
    return http(data1)
  },

  /**
   * 出行服务协议-用户指南
   */
  serviceAgreement(data = {}) {
    const data1 = Object.assign({
      url: "/api/wx/commonApi/getServiceAgreement"
    }, {
      data
    })
    return http(data1)
  },
  /**
   * 运维接口：下发寻车指令（普通运维、超级运维）
   * 用户刷新车辆定位
   */
  findLocation(data = {}) {
    const data1 = Object.assign({
      url: "/api/wx/LockDeviceApi/findLocation"
    }, {
      data
    })
    return http(data1)
  },
  /**
   * 获取常见问题列表
   * @param {*} data 
   */
  getCommonProblemListAPI(data = {}) {
    const data1 = Object.assign({
      url: "/api/wx/commonApi/queryFaq"
    }, {
      data
    })
    return http(data1)
  },

  searchLockDevice(data = {}) {
    const data1 = Object.assign({
      url: "/api/wx/commonApi/searchLockDevice"
    }, {
      data
    })
    return http(data1)
  },
  getDistributorParkPoint(data = {}) {
    const data1 = Object.assign({
      url: '/api/wx/LockDeviceApi/getDistributorParkPoint'
    }, {
      data
    })
    return http(data1)
  }
}